<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../logo.png">
    <title>(name-value)饼图 | 测试</title>
    <script src="../node_modules/clunch/dist/clunch.js"></script>
    <script src="../dist/plain-chart.js"></script>
    <style>
        #canvas {
            width: 400px;
            height: 300px;
        }
    </style>
</head>

<body>

    <div id='canvas'></div>

    <script>

        // 获取图表对象
        var myChart = PlainChart.init(Clunch, document.getElementById('canvas'));

        // 创建图表
        var chart1 = myChart.new({

            type: "pie",
            data: [{
                name: "玉米",
                value: 14
            }, {
                name: "大豆",
                value: 9
            }, {
                name: "香蕉",
                value: 24
            }, {
                name: "西瓜",
                value: 41
            }]

        });

    </script>

</body>

</html>
